Querying Licence Information
To query licence information, create a connection string and use
Licence Support functions:
// Get some licence information Legion::LicenceSupport::Simulator_API_ConnectionString::SimAPIPublicKeyPtr pPublicLicenceKey_Out; Legion::LicenceSupport::CLegnLicenceSupport licenceSupport( pPublicLicenceKey_Out ); std::string strLicenceConnectionString_Out; Legion::LicenceSupport::Simulator_API_ConnectionString::Encrypt( pPublicLicenceKey_Out, sLicenseeOrganisation_In, sProductName_In, sProductVersion_In, strLicenceConnectionString_Out ); std::string organisation; licenceSupport.GetLicenseeOrganisation( strLicenceConnectionString_Out, organisation ); std::cout << "Licensee Organisation: " << organisation << std::endl; std::string sExpiryDate; licenceSupport.GetExpiryDate( strLicenceConnectionString_Out, sExpiryDate ); std::cout << "Expiry date: " << sExpiryDate << std::endl; int iMaxActivityObjects = licenceSupport.GetMaxActivityObjects( strLicenceConnectionString_Out ); std::cout << "Max activity objects: " << iMaxActivityObjects << std::endl; bool bCanRecordRES = licenceSupport.CanRecordRES( strLicenceConnectionString_Out ); std::string boolalpha = ( bCanRecordRES ? "yes" : "no" ); std::cout << "Can record RES: " << boolalpha << std::endl; |